<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button id="btn1" onclick="test1()">测试1-打开窗口</button>
		<button id="btn1" onclick="test2()">测试2-关闭窗口</button>
		<button id="btn1" onclick="test3()">测试3-关闭自己</button>
		
		<script type="text/javascript">
			var p;
			function test1()
			{
				p=window.open("new.html","new","width=208,height=100,top=300,left=200");
			}
			
			function test2()
			{
				p.close();
			}
			
			function test3()
			{
				window.close();
			}
		</script>
	</body>
</html>
